   <script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
  $('.clickMe').click(function(){
      $('#main').append('<div class="add"><input type="text"><input type="button" value="delete me" class="del"></div>');
  });

  $('.del').live('click',function(){
      $(this).parent().remove();
  });
});
</script>

<div id="main"></div>

<span style="color:blue;cursor:pointer;" class="clickMe">click here</span>






